/* 全局样式重置和优化 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Element Plus 组件样式优化 */
.el-menu-item {
  border-radius: 8px !important;
  margin: 4px 12px !important;
}

.el-menu-item:hover {
  background-color: var(--el-color-primary-light-9) !important;
}

.el-menu-item.is-active {
  background-color: var(--el-color-primary-light-8) !important;
  color: var(--el-color-primary) !important;
}

.el-dropdown-menu__item {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: var(--el-fill-color-lighter);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: var(--el-fill-color-dark);
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--el-fill-color-darker);
}

/* 暗黑模式下的滚动条 */
.dark ::-webkit-scrollbar-track {
  background: var(--el-fill-color);
}

.dark ::-webkit-scrollbar-thumb {
  background: var(--el-fill-color-light);
}

.dark ::-webkit-scrollbar-thumb:hover {
  background: var(--el-fill-color-lighter);
}

/* 页面过渡动画 */
.fade-enter-active,
.fade-leave-active {
  transition: opacity 0.2s ease;
}

.fade-enter-from,
.fade-leave-to {
  opacity: 0;
}
